home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / gdb / gdb_18s.zoo / README < prev    next >
Encoding:
Text File  |  1992-04-27  |  13.0 KB  |  353 lines

  1. GDB @ Patchlevel 18
  2.  
  3.     - many of you had difficulty with finding gdb @Patchlevel 16
  4.     to patch to PL 17 with the last set of diffs. I apologize for
  5.     this. gdb@pl 17 is now available on atari.archive.umich.edu
  6.     for you to apply the 17->18 diffs.
  7.  
  8.     - many small bug fixes.
  9.  
  10.     - gdb -L is not working reliably. i still have'nt tracked this down.
  11.     But other than that gdb is doing quite well.
  12.  
  13. GDB @ Patchlevel 17
  14.     - gdb -L (logging) now always works independent of TOS etc.
  15.  
  16. GDB @ Patchlevel 16
  17.     - andreas sent a more reliable way to intut -mshort.
  18.  
  19.     - gdb will not bomb out when it tries to access some unitialized
  20.     vars in the child. thanks again to andreas.
  21.  
  22.     - gdb will sometimes bomb out when you have a syntax error in
  23.     the gdb command that you enter. i will fix this at a future
  24.     time. the fixes are easy but tedious. in the mean while
  25.     avoid syntax errors in gdb commands :-)
  26.  
  27.     - also planned for the next version a more tos version independent
  28.     way of logging.
  29.  
  30.     - some of you have asked about screen flipping
  31.     and logging the debugees (the program being debugged) output. i
  32.     personaly dont plan to do this, but you should feel free to
  33.     put in those features.
  34.  
  35.     - note: gdb-atartST still cannot handle g++'s output.
  36.  
  37. GDB @ Patchlevel 15   
  38.  
  39. ================NOTE      NOTE      NOTE    NOTE============================
  40.  
  41.          TOS 1.4 or better required unless you
  42.              recompile the source with -DOLDTOS
  43.  
  44. ================NOTE      NOTE      NOTE    NOTE============================
  45.  
  46.     *************************************************
  47.        Please get rid of gdb Patchlevel 14 or older
  48.     *************************************************
  49.  
  50.     yet another significant update to gdb-atariST. please take
  51.     a few moments to read over gdb.texinfo too (ie: dont expect
  52.     to find all the answers in this README file :-).
  53.  
  54.     - gdb now has a new option to log a gdb session. gdb -L will
  55.     log the session in the file gdb.log (append if the file already
  56.     exists). Use this option WITH EXTREME CAUTION. This only works
  57.     with TOS 1.4. I have a later version of TOS and it does not
  58.     work correctly with it, and it goes and adds stuff to random
  59.     files. I dont know if -L will work with the TOS in STe's or TT's.
  60.     you have been adequately warned.!!
  61.  
  62.     - gdb will NOT try to intut when it is trying to debug a -mshort
  63.     compiled program. The user must specify the "-mshort" option to
  64.     gdb.ttp if you are going to try and debug a -mshort compiled
  65.     application. the heauristic we were using earlier to intut -mshort
  66.     did not work very well, and caused many problems. So the sequence
  67.     for a typical -mshort compile/debug becomes:
  68.  
  69.         gcc -mshort -c -g foo.c bar.c
  70.         gcc -mshort -o foo foo.o bar.o
  71.             sym-ld -o foo.sym e:\lib\crt0.o foo.o bar.o -lgnu16
  72.         gdb -mshort -e foo -s foo.sym
  73.  
  74.     - gdb wont get confused when -mshort is used, and the arguements
  75.     to a function are displayed (on a breakpoint, backtrace etc).
  76.     the arguements were always being passed correctly, but were not
  77.     being displayed correcty.
  78.  
  79.     - gdb wont get confused by certain typedefs.
  80.  
  81.     - Frames fixed. up/down etc should work.
  82.  
  83.     - will not allow you to re-run inferior (even if the
  84.     inferior has exited). this is not possible to do under TOS.
  85.  
  86.     - NEEDS tos 1.4 or better and uses Pexec mode 6 to launch
  87.           inferior.
  88.  
  89.     - many people are confused about this: to pass command line
  90.     arguements to the program to be debugged  you have to either
  91.         set-args args ...
  92.        BEFORE you issue the initial run command
  93.     or you can specify the args in the initial run command
  94.         run args ...
  95.     the run args... form is more convenient.
  96.  
  97.     - got rid of the initialization hacks, now all the init
  98.     functions are called from init.c (which in turn in called
  99.     from main). now we can compile gdb with -O etc.
  100.  
  101.     - other code reorgs and hacks.
  102.  
  103.     - much thanks to Michal Jaegermann who provided lots of
  104.     suggestions examples  and suffered thru many intermmediate
  105.     versions.
  106.  
  107. GDB @ Patchlevel 14
  108.  
  109.     *************************************************
  110.        Please get rid of gdb Patchlevel 12 or older
  111.     *************************************************
  112.  
  113.     here is a major update to gdb. i have fix lots of stuff, and
  114.     put together a preliminary doc (which is almost accrate).
  115.     
  116.     - massive overhauling of most parts of the code. literally
  117.     dozens of bug fixes. i feel it is beta quality code now.
  118.     it is very usable.
  119.  
  120.     - gcc -mshort compiled objects should work pretty much
  121.     now. gdb tries to intut when its reading in the object
  122.     if it was -mshort compiled. a new command "gcc-mshort"
  123.     is available in gdb that will communicate the fact to
  124.     gdb in case it can fails to figure it out.
  125.  
  126.     - new additions: "until" and "disassemble" commands. see
  127.     gdb.texinfo for details.
  128.  
  129.     - things to take note of:
  130.  
  131.        - if you include <osbind.h> or <linea.h>, then compile
  132.     your program with -D__NO_INLINE__. gdb cannot handle inlined
  133.     asm code gracefully, as it is not expecting exceptional conditions
  134.     at the point. So if you try to (s)tep or (n)ext over an
  135.     asm inlined piece of code, gdb will be confused. Note that
  136.     as long as you are not going to (s)tep or (n)ext over them, inlined
  137.     asm segments are fine, and will not confuse gdb. Also note that
  138.     inlined C code is just fine. (so you dont need __NO_INLINE__
  139.     for <stdio.h> etc).
  140.  
  141.     - calling a C function from a gdb command (like in the command
  142.      "print foo(x)") is not reliable. The printed value is always
  143.     incorrect (always 0). The arguements are not pushed reliably
  144.     when you are debugging a -mshort object (in some situations
  145.     they are, in some they are not). Sometimes (most times!) gdb will
  146.     get totally confused after return from a function called from a
  147.     gdb command expression. so avoid doing this right now. i am
  148.     working on this.
  149.  
  150.     please send feedback.
  151.  
  152.     ++jrb @Patchlevel 14 9/21/91
  153.     
  154. -----------------------------------------------------------------------------`
  155.  
  156.     *************************************************
  157.        Please get rid of gdb Patchlevel 10 or older
  158.     *************************************************
  159.  
  160.     Major problems fixed after previous distribution (Patchlevel 8):
  161.  
  162.     - doing a next over a library function call no longer confuses
  163.     gdb.
  164.  
  165.     - gdb does'nt do strange things when the debugee exits. doing
  166.     a run without any bkpt's set now will not freeze up 
  167.     (some) machines.
  168.  
  169.     - gdb now relocates everything it needs to.
  170.  
  171.     Known problems in Patchlevel 12:
  172.  
  173.     - it still gets confused about the current frame and/or the up frame
  174.     once in while (but not so often, its very usable now).
  175.  
  176.     - if you try to do gdb commands before you do the initial run
  177.     it will complain (or in some circumstances even successfully do
  178.     the command), but later it will be very confused and act strangely.
  179.     the solution of course is to ALWAYS do run first, and then issue
  180.     command (the only command that you should do before the inital
  181.     run, is set-args if needed)
  182.  
  183.     - it does not work so hot with -mshort compiled binaries. for
  184.     debugging purposes dont use -mshort for now. actually, i dont
  185.     see why this is a concern at all!
  186.  
  187.     - it still need symld -- no big deal of course.
  188.  
  189. here is the real README:
  190.  
  191. Here is a heavily hacked  gdb for atariST, based on the incredible work
  192. of John Dunning of porting it to the ST.
  193.  
  194. The big difference is that this version supports dbx_format symbols and
  195. stabs, not the gnu format (ie: "gcc -g" and not "gcc -gg"). gnu has
  196. essentially dropped support for the -gg format. Other than that, it is
  197. still undergoing development, to make it as stable, and to bring it up
  198. to the changes in the latest rev of gdb from FSF. It is quite usable,
  199. and a lot of you have been waiting for "something" so i am sending it
  200. out for you to play with. I will provide updates (hopefully in a timely
  201. fashion :-).
  202.  
  203. PREREQUISITES:
  204.   before you can use this version of GDB you have to ensure that you have:
  205.  
  206.     - gcc V1.39 (.0 or better)
  207.     - gas V1.38 (i think 1.36 will work, but i never tested it)
  208.     - library Patchlevel 66
  209.       (only needed if you want o recompile gdb)
  210.     - include files V66
  211.       (i do not guarantee anything with any older version of the
  212.        include files, you must assure that you have a <stdio.h>
  213.        in which getc() is a macro and not an inline function when
  214.        !__NO_INLINE__. It will work correctly, but it will not
  215.        break in the function containing the getc/getchar, even though
  216.        it will successfully set the breakpoint.)
  217.     - gcc-ld.ttp and sym-ld.ttp from utils Patchlevel 17 or better.
  218.        Any older versions of these is guaranteed NOT to work.
  219.     - ATLEAST the following patches to dbxout.c and toplevel.c in
  220.     the gcc-tos source. these patches assume that you have already applied
  221.     patches for the atari-tos version of gcc 1.39 (to toplev.c, dbxout
  222.     did'nt have any diffs from the fsf ditsribution).
  223.     There are other patches (includeing these two) in ../../gcc/diffs
  224.     so you might as well apply them while you are at it.
  225.  
  226. *** /home/bammi/etc/src/gcc-1.39/dbxout.c    Wed Oct 17 00:16:31 1990
  227. --- dbxout.c    Sun May 12 12:59:05 1991
  228. ***************
  229. *** 83,89 ****
  230.   #define FORCE_TEXT
  231.   #endif
  232.   
  233. ! #ifdef USG
  234.   #include "stab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  235.   #else
  236.   #include <stab.h>  /* On BSD, use the system's stab.h.  */
  237. --- 83,89 ----
  238.   #define FORCE_TEXT
  239.   #endif
  240.   
  241. ! #if defined(USG) || defined(CROSSATARI) || defined(atarist) || defined(atariminix)
  242.   #include "stab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  243.   #else
  244.   #include <stab.h>  /* On BSD, use the system's stab.h.  */
  245. ***************
  246. *** 186,194 ****
  247. --- 186,200 ----
  248.     bzero (typevec, typevec_len * sizeof typevec[0]);
  249.   
  250.     /* Used to put `Ltext:' before the reference, but that loses on sun 4.  */
  251. + #ifndef atarist
  252.     fprintf (asmfile,
  253.          "\t.stabs \"%s\",%d,0,0,Ltext\nLtext:\n",
  254.          input_file_name, N_SO);
  255. + #else
  256. +   fprintf (asmfile,  "\t.stabs \"");
  257. +   atari_output_filename(asmfile, input_file_name);
  258. +   fprintf(asmfile, "\",%d,0,0,Ltext\nLtext:\n", N_SO);
  259. + #endif
  260.   
  261.     next_type_number = 1;
  262.     next_block_number = 2;
  263. *** ../gcc-diff-1.39/toplev.c    Sun Jan 20 16:29:28 1991
  264. --- toplev.c    Sun May 12 14:06:26 1991
  265. ***************
  266. *** 2110,2112 ****
  267. --- 2110,2126 ----
  268.   
  269.     fprintf (stderr, "\n");
  270.   }
  271. + #ifdef atarist
  272. + void atari_output_filename(file, filename)
  273. + FILE *file;
  274. + char *filename;
  275. + {
  276. +     if( (!file) || (!filename) ) return;
  277. +     for(; *filename; filename++)
  278. +     {
  279. +     if(*filename == '\\') putc('\\', file);
  280. +     putc(*filename, file);
  281. +     }
  282. + }
  283. + #endif
  284. --------------------------------------cut-------------------------------
  285.  
  286. HOW TO USE IT:
  287.     to debug a program called foo, consisting of foo.c and bar.c do
  288.  
  289.         gcc -g -c foo.c bar.c      (-O optional)
  290.         gcc -o foo foo.o bar.o          (get normal TOS executable)
  291.         sym-ld -o foo.sym e:\lib\crt0.o foo.o bar.o -lgnu    (make symbol file)
  292.                                 (use the appro. full path to your crt0.o
  293.                                  note: sym-ld -r is not required and -l works).
  294.  
  295.         gdb -e foo -s foo.sym   (fire up gdb with exec-file == foo and
  296.                                                   symbol-file == foo.sym)
  297.         (gdb) r [any-args to foo] (before doing anything, you have to run,
  298.                                 and it will break immediately with a
  299.                                 non-sensical message)
  300.     NOTE VERY CAREFULLY: no other gdb commands before you issue
  301.                  the run command. this is the most common
  302.                  mistake. if you want to pass args to foo
  303.                  specify them with the run command. The
  304.                  arguements may not exceed 126 characters
  305.                  and they may not contain re-directions.
  306.  
  307.         (gdb) b main            (now start issuing normal gdb commands)
  308.           ...
  309.         (gdb) c                 finally a continue to actually start the prog
  310.          .... and so on
  311.         (gdb) q
  312.  
  313.  
  314.  - use the online help
  315.  - when debugging a large program, if gdb appears to be confused about
  316.    line numbers, especially when you set a breakpoint, and it sets
  317.    it on a non-sensical line number or a line-number where you
  318.    did'nt expect it to set it at, you have run out of stack (alloca)
  319.    space in gdb. You will have to tailor _initial_stack in atarist.c to
  320.    your environment. i ship with 128K. in my setup i use 512K, and it
  321.    is quite comfortable with good sized programs.
  322.  
  323.  - this version should work fine with the TT other 020 based accel. it
  324.    has'nt been extensively tested in that environment.
  325.  - It works with MiNT and/or MiNT/mgr. Dont try to link with mntlib though.
  326.    A MiNT specific version is in the works. Oh, it may get confused by
  327.    SIGTSTP (^Z), and other kills with inappropriate signal numbers.
  328.    see ./signal.h. the mapping of signals to values is not the same as
  329.    in MiNT and/or normal gcc-tos lib.
  330.  
  331. COMPILING:
  332.  - adjust _initial_stack for you environment in atarist.c
  333.  - it is VERY VERY important to specify "-I." when compiling ANY module
  334.    of gdb. Some of the .h files in the src directory, MUST be included
  335.    from here, rather than the gcc-include directory. (we are faking out
  336.    everything to do with signals).
  337.  - do NOT try to link with mntlib.
  338.  
  339. BUGS:
  340. - please send me reports along with Patchlevels of gdb/include/util
  341.   i will most probably not entertain any bugs with
  342.     util < 17
  343.         lib  < 66
  344.     include < 66
  345.  
  346. enjoy,
  347. --
  348. bang:   uunet!cadence!bammi            jwahar r. bammi
  349. domain: bammi@cadence.com
  350. GEnie:    J.Bammi
  351. CIS:    71515,155
  352.